package com.htfyun.roobofactory.config;

import com.htfyun.roobofactory.htfyunUtils.NvDataTool;

/**
 * Created by sst on 2018/7/17.
 */

public final class PCCommand {

    /**
     * 设备收到广播后, 向 /sdcard/pcba.txt 写入测试结果字符串.<P>
     * pcba测试结果是保存在nvrom中, 他的key值是 "str_key_pcba_test_result",<P>
     * 而他的value指一般是下面类型: "PCBA:TP ok,KEY ok,CAMERA ok,LCD ok,MOTO ok,TOUCHKEY ok,LED ok,SPK ok,MIC ok,SDCARD ok,WIFI ok".<P>
     * PC-TOOL 解析 /sdcard/pcba.txt 时, 判断里面是否包含有" MA" 和 " fail" 即可.<P>
     */
    public final static String PC_ACTION_GET_RESULT_PCBA = "pc.factorytest.get_pcba_result";
    public final static String PC_ACTION_GET_RESULT_PCBA_FILE_PATH = "/sdcard/pcba.txt";

    /**
     * 设备收到广播后, 向 "/sdcard/ft_check.txt" 和 "/sdcard/ft_result.txt" 分别写入各自测试结果字符串.<P>
     * ft_checked.txt 里的值是由nvrom里面读取到的. 其key值是 "str_key_pctool_ft_checked"<P>
     *
     *
     * 参见 {@link #PC_ACTION_SET_CHECKED, {@link #PC_ACTION_SET_UNCHECKED}}
     */
    public final static String PC_ACTION_GET_FT_CHECKED_AND_RESULT = "pc.factorytest.get_ft_checked_and_result";
    public final static String PC_ACTION_GET_FT_CHECKED_AND_RESULT_CHECKED_FILE_PATH = "/sdcard/ft_checked.txt";
    public final static String PC_ACTION_GET_FT_CHECKED_AND_RESULT_RESULT_FILE_PATH = "/sdcard/ft_result.txt";
    public final static String PC_ACTION_GET_FT_CHECKED_AND_RESULT_LOG_FILE_PATH = "/sdcard/ft_log.txt";

    public final static String PC_TOOL_FT_CHECKED = NvDataTool.PC_TOOL_FT_CHECKED;
    public final static String PC_TOOL_FT_UNCHECKED = NvDataTool.PC_TOOL_FT_UNCHECKED;


    /**
     * PC端发送广播命令:<p>
     * "adb shell am broadcast -a pc.factorytest.set_checked" <p>
     *     1.1 apk 获取到此广播后, 需要做2个操作:<p>
     *     A. 将结果写入nvrom(key=str_key_pctool_ft_checked);<p>
     *     B. 需要设置 setprop "persist.pctool.checked" CHECKED;<p>
     */
    public final static String PC_ACTION_SET_CHECKED = "pc.factorytest.set_checked";
    /**
     * PC端发送广播命令:<p>
     * "adb shell am broadcast -a pc.factorytest.set_unchecked" <p>
     *     1.1 apk 获取到此广播后, 需要做2个操作:<p>
     *     A. 将结果写入nvrom(key=str_key_pctool_ft_checked);<p>
     *     B. 需要设置 setprop "persist.pctool.checked" UNCHECKED;<p>
     */
    public final static String PC_ACTION_SET_UNCHECKED = "pc.factorytest.set_unchecked";
    public final static String PC_ACTION_SET_CHECKED_PROP = RooboProperty.PC_TOOL_CHECKED_PROP;


    ////////////////////////////////////////
    //adb shell am broadcast -a pc.factorytest.ignore_bsn_burnt --ez ignore true/false
    public final static String PC_ACTION_SET_FT_IGNORE_BSN_BURNT = "pc.factorytest.ignore_bsn_burnt";
    public final static String ACTION_SET_FT_IGNORE_BSN_BURNT_EXTRAL_BOOLEAN_KEY = "ignore";

    //adb shell am broadcast -a pc.factorytest.force_passed --ez passed true/false
    public final static String PC_ACTION_SET_FT_FORCE_ALL_TEST_ITEMS_PASS = "pc.factorytest.force_passed";
    public final static String ACTION_SET_FT_FORCE_ALL_TEST_ITEMS_PASS_EXTRAL_BOOLEAN_KEY = "passed";


}
